package com.yanqu.road.entity.kowloon.config;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.config.system.NormalWeightItem;

import java.util.ArrayList;
import java.util.List;

@FieldTypeAnnotation(tableName = "t_p_kowloon_mission_road", desc = "九龙城寨关卡配置")
public class KowloonMissionRoadConfig {

    @FieldTypeAnnotation(desc = "ID", select = true, orderASC = true)
    private int id;

    @FieldTypeAnnotation(desc = "关卡id")
    private int missionRoadId;

    @FieldTypeAnnotation(desc = "挂机收益/h")
    private String income = "";

    @FieldTypeAnnotation(desc = "最长挂机时间/h")
    private int maxTime;

    @FieldTypeAnnotation(desc = "波次")
    private int wave;

    @FieldTypeAnnotation(desc = "步数")
    private int stepNum;

    @FieldTypeAnnotation(desc = "初级技能列表")
    private List<NormalWeightItem> juniorSkillsList = new ArrayList<>();

    @FieldTypeAnnotation(desc = "中级技能列表")
    private List<NormalWeightItem> middleSkillsList = new ArrayList<>();

    @FieldTypeAnnotation(desc = "高级技能列表")
    private List<NormalWeightItem> highSkillsList = new ArrayList<>();

    @FieldTypeAnnotation(desc = "元素权重")
    private List<Integer> elementWeights;

    @FieldTypeAnnotation(desc = "银锭权重")
    private int silverIngotWeights;

    @FieldTypeAnnotation(desc = "地痞id")
    private List<Integer> ruffianIdList;

    @FieldTypeAnnotation(desc = "地痞数量")
    private List<Integer> ruffianNum;

    @FieldTypeAnnotation(desc = "地痞血量")
    private List<Long> ruffianHp;

    @FieldTypeAnnotation(desc = "地痞行走路线")
    private List<String> ruffianWalkRoute;

    @FieldTypeAnnotation(desc = "地痞出生延迟时间")
    private List<Integer> ruffianDelayTime;

    @FieldTypeAnnotation(desc = "地痞资源大小缩放")
    private List<String> resourceSizeRandom = new ArrayList<>();

    @FieldTypeAnnotation(desc = "地痞移动速度随机")
    private List<String> moveRandom = new ArrayList<>();

    @FieldTypeAnnotation(desc = "生成新方块权重加成")
    private List<Integer> weightAddList = new ArrayList<>();

    @FieldTypeAnnotation(desc = "首次通关奖励")
    private String onceReward = "";

    @FieldTypeAnnotation(desc = "推荐战力")
    private long needPower;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getMissionRoadId() {
        return missionRoadId;
    }

    public void setMissionRoadId(int missionRoadId) {
        this.missionRoadId = missionRoadId;
    }

    public String getIncome() {
        return income;
    }

    public void setIncome(String income) {
        this.income = income;
    }

    public int getMaxTime() {
        return maxTime;
    }

    public void setMaxTime(int maxTime) {
        this.maxTime = maxTime;
    }

    public int getWave() {
        return wave;
    }

    public void setWave(int wave) {
        this.wave = wave;
    }

    public int getStepNum() {
        return stepNum;
    }

    public void setStepNum(int stepNum) {
        this.stepNum = stepNum;
    }

    public List<NormalWeightItem> getJuniorSkillsList() {
        return new ArrayList<>(juniorSkillsList);
    }

    public void setJuniorSkillsList(List<NormalWeightItem> juniorSkillsList) {
        this.juniorSkillsList = juniorSkillsList;
    }

    public List<NormalWeightItem> getMiddleSkillsList() {
        return new ArrayList<>(middleSkillsList);
    }

    public void setMiddleSkillsList(List<NormalWeightItem> middleSkillsList) {
        this.middleSkillsList = middleSkillsList;
    }

    public List<NormalWeightItem> getHighSkillsList() {
        return new ArrayList<>(highSkillsList);
    }

    public void setHighSkillsList(List<NormalWeightItem> highSkillsList) {
        this.highSkillsList = highSkillsList;
    }

    public List<Integer> getElementWeights() {
        return elementWeights;
    }

    /**
     * 根据颜色获得权重，5是银锭
     * @param color
     * @return
     */
    public int getElementWeight(int color) {
        if (color < 5) {
            if (color > elementWeights.size() || color <= 0) {
                return 0;
            }
            return elementWeights.get(color - 1);
        }else{
            return silverIngotWeights;
        }
    }

    public void setElementWeights(List<Integer> elementWeights) {
        this.elementWeights = elementWeights;
    }

    public int getSilverIngotWeights() {
        return silverIngotWeights;
    }

    public void setSilverIngotWeights(int silverIngotWeights) {
        this.silverIngotWeights = silverIngotWeights;
    }

    public List<Integer> getRuffianIdList() {
        return ruffianIdList;
    }

    public void setRuffianIdList(List<Integer> ruffianIdList) {
        this.ruffianIdList = ruffianIdList;
    }

    public List<Integer> getRuffianNum() {
        return ruffianNum;
    }

    public void setRuffianNum(List<Integer> ruffianNum) {
        this.ruffianNum = ruffianNum;
    }

    public List<Long> getRuffianHp() {
        return ruffianHp;
    }

    public void setRuffianHp(List<Long> ruffianHp) {
        this.ruffianHp = ruffianHp;
    }

    public List<String> getRuffianWalkRoute() {
        return ruffianWalkRoute;
    }

    public void setRuffianWalkRoute(List<String> ruffianWalkRoute) {
        this.ruffianWalkRoute = ruffianWalkRoute;
    }

    public List<Integer> getRuffianDelayTime() {
        return ruffianDelayTime;
    }

    public void setRuffianDelayTime(List<Integer> ruffianDelayTime) {
        this.ruffianDelayTime = ruffianDelayTime;
    }

    public List<String> getResourceSizeRandom() {
        return resourceSizeRandom;
    }

    public void setResourceSizeRandom(List<String> resourceSizeRandom) {
        this.resourceSizeRandom = resourceSizeRandom;
    }

    public List<String> getMoveRandom() {
        return moveRandom;
    }

    public void setMoveRandom(List<String> moveRandom) {
        this.moveRandom = moveRandom;
    }

    public List<Integer> getWeightAddList() {
        return weightAddList;
    }

    public void setWeightAddList(List<Integer> weightAddList) {
        this.weightAddList = weightAddList;
    }

    public String getOnceReward() {
        return onceReward;
    }

    public void setOnceReward(String onceReward) {
        this.onceReward = onceReward;
    }

    public long getNeedPower() {
        return needPower;
    }

    public void setNeedPower(long needPower) {
        this.needPower = needPower;
    }
}
